import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import prismjs from 'vite-plugin-prismjs';
import removeConsole from 'vite-plugin-remove-console'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    ...process.env.NODE_ENV == "production"?[removeConsole()]:[],
    prismjs({
    languages: ['csharp','javascript','html'],
  }),vue()],
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    }
  },
  define:{
    'process.env':{
      //development production test
      'ServerUrl': process.env.NODE_ENV == "development" ? "http://localhost:5000":".."
    }
  }
})
